package WindowRe;

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;

public class Window extends JFrame {

    public Window(){
        this.setLayout(null);

        new WindowButton("添加",60,240,this);
        new WindowButton("删除",210,240,this);
        new WindowButton("修改",60,280,this);
        new WindowButton("查找",210,280,this);

//        new WindowJLabel("姓名",80,50,this);
//        new WindowJLabel("年龄",80,90,this);
//        new WindowJLabel("性别",80,130,this);
//        new WindowJLabel("电话",80,170,this);
//
//        new WindowJTextField(160,50,this);
//        new WindowJTextField(160,90,this);
//        new WindowJTextField(160,130,this);
//        new WindowJTextField(160,170,this);

        new WindowAssemble("姓名",80,50,this);
        new WindowAssemble("年龄",80,90,this);
        new WindowAssemble("性别",80,130,this);
        new WindowAssemble("电话",80,170,this);

        //创建边框
        JPanel jp = new JPanel();
        Border border = BorderFactory.createLineBorder(Color.BLACK,2);
        jp.setBorder(BorderFactory.createTitledBorder(border,"请选择"));
        jp.setBounds(50,320,300,100);
        this.add(jp);

        //设置JPanel的布局管理器
        jp.setLayout(null);
        JButton b = new JButton("确定");
        b.setBounds(30,30,80,20);
        jp.add(b);


        this.setSize(400,500);
        this.setVisible(true);
        this.setTitle("你 好");
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo(null);
    }


    public static void main(String[] args) {
        new Window();
    }
}
